def greedy():
    states_needed=set(['mt','wa','or','id','nv','ut','ca','az'])
    stations={}
    stations['kone']=set(['id','nv','ut'])
    stations['ktwo']=set(['wa','id','mt'])
    stations['kthree']=set(['or','nv','ca'])
    stations['kfour']=set(['nv','ut'])
    stations['kfive']=set(['ca','az'])
    # states_common=()
    # states_common_most=()
    processed=[]
    common_num=0
    #big_num=0
    while(states_needed):
        # and not in processed
        big_num=0
        for n in stations.keys():
            if n not in processed:
                num=len(states_needed&stations[n])
                if num>big_num and n not in processed:                    
                    big_num=num
                    key=n
        states_needed-=stations[key]
        print(states_needed)
        processed.append(key)
    print(processed)                                
def main():
    greedy()
if __name__=="__main__":
    main()